<template>
	<view>
		<web-view :webview-styles="webviewStyles" :src="url"></web-view>
	</view>
</template>

<script>
    export default {
		data() {
			return {
				url:'',
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				}
			};
		},
		onLoad: function (option) {
			// console.log('客服页面onLoad：',option)
			this.loadData();
		},
		onNavigationBarButtonTap(val) {
			// console.log('客服页面onNavigationBarButtonTap：',val)
			uni.switchTab({
				url: '/pages/index/index',
			});	
		},
		methods: {
			loadData:function(){
				//获取基础参数
				let timestamp = this.helper.now();
				let sign = this.helper.setSign(['key=service','timestamp='+timestamp]);
				this.helper.req({
					api:"getInfoSet",
					timestamp:timestamp,
					data:{key:'service'},
					header:{sign:sign},
					method:'GET',
				}).then(res=>{
					this.url = res.data.data.value;
				})
			},
		},
	};
</script>

<style lang="scss">

</style>